import { Module } from '@nestjs/common';
import { StudentModule } from './modules/student/student.module';
import { TypeOrmModule } from '@nestjs/typeorm';
import { Student } from './modules/student/entities/student.entity';
import { OrganizationModule } from './modules/organization/organization.module';
import { Organization } from './modules/organization/entities/organization.entity';
import { ClassroomModule } from './modules/classroom/classroom.module';
import { Classroom } from './modules/classroom/entities/classroom.entity';
import { SubjectModule } from './modules/subject/subject.module';
import { EmployeeModule } from './modules/employee/employee.module';
import { RoleModule } from './modules/role/role.module';

@Module({
  imports: [
    TypeOrmModule.forRoot({
      type: 'mysql',
      host: 'localhost',
      port: 3306,
      username: 'root',
      password: 'root',
      database: 'fast-education',
      entities: [Student, Organization, Classroom],
      synchronize: true,
    }),
    StudentModule,
    OrganizationModule,
    ClassroomModule,
    SubjectModule,
    EmployeeModule,
    RoleModule,
  ],
})
export class AppModule {
}
